#ifndef TRIGGERSCRIPTMODEL_H
#define TRIGGERSCRIPTMODEL_H

#include <QAbstractListModel>
#include <QList>
#include "aed_archtype.h"
class TriggerScriptModel : public QAbstractListModel
{
    Q_OBJECT
    QList<AED_Trigger>* m_triggers;
    ScriptModel *m_scriptmodel;
public:
    explicit TriggerScriptModel(AED_Archtype* arch, ScriptModel *scrmdl, QObject *parent = 0);
    int rowCount(const QModelIndex & parent = QModelIndex()) const;
    QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const;
    QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
    bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
    Qt::ItemFlags flags(const QModelIndex &index) const;
    void setArchtype(AED_Archtype* arch);
    
signals:
    //void CurrentTriggerChanged(AED_Trigger *trigger);
    
public slots:
    void AddScript();
    void RemoveScript(int index);
};

#endif // TRIGGERSCRIPTMODEL_H
